<?php
if (MENU_TYPE) {
?>
<!-- pc端导航 -->
<div class="block-header">
  <div class="main">
    <div class="block-logo">
      <img alt="logo" src="/static/image/favicon.png" alt="<?php echo $GLOBALS['cms']['name']; ?>" />
    </div>
    <div class="block-nav">
      <?php // echo navigation(0, '<li><a href="/">网站首页</a></li>', $this->id);
        echo file_get('html', 'navigation');
        ?>
    </div>
    <form class="navbar-form navbar-right" method="post" action="<?php echo M('index', 'search'); ?>">
      <?php echo $this->csrf(); ?>
      <div class="input-group">
        <input type="text" name="keyword" class="form-control" placeholder="请输入关键词"
          value="<?php echo $this->keyword; ?>" autofocus="true" tabindex="0" />
        <span class="input-group-btn">
          <button type="submit" class="btn btn-default">检索</button>
        </span>
      </div>
    </form>
  </div>
</div>
<?php
} else {
?>
<nav class="navbar navbar-default">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"
        aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/"><img alt="logo" src="/static/image/favicon.png" /></a>
    </div>
    <div class="collapse navbar-collapse" id="navbar-collapse">
      <nav class="nav navbar-nav">
        <li><a href="/">网站首页</a></li>
        <?php
          // echo nav_m(0, $this->id);
          echo file_get('html', 'navigation');
          ?>
      </nav>

      <form class="navbar-form navbar-right" method="post" action="<?php echo M('index', 'search'); ?>">
        <?php echo $this->csrf(); ?>
        <div class="input-group">
          <input type="text" name="keyword" class="form-control" placeholder="请输入关键词"
            value="<?php echo $this->keyword; ?>" autofocus="true" tabindex="0" />
          <span class="input-group-btn">
            <button type="submit" class="btn btn-default">检索</button>
          </span>
        </div>
      </form>
    </div>
  </div>
</nav>
<?php
}
?>